package decorator.test;

import decorator.base.BaseBeverage;
import decorator.children.Espresso;
import decorator.children.HouseBlend;
import decorator.children.Mocha;
import decorator.children.YaoCoffee;
import util.StringUtil;


/**
 * 订单测试
 * @author yaojianfeng
 */
public class StarBuzzCoffee {
    public static void main(String[] args) {
        //浓咖啡订单
        BaseBeverage beverage = new Espresso();
        System.out.println(beverage.getDescription()+":$"+beverage.cost());
        //混合订单
        BaseBeverage beverage1 = new HouseBlend();
        beverage1 = new Mocha(beverage1);
        beverage1 = new YaoCoffee(beverage1);
        beverage1 = new Mocha(beverage1);
        System.out.println(beverage1.getDescription()+":$"+beverage1.cost());
        String slkjwpegksdd = StringUtil.getCrc32("slkjwpegksdd");
        System.out.println(slkjwpegksdd);
        String randNum = StringUtil.getRandNum(3);
        int i = StringUtil.randomInt(3, 1222);
        System.out.println(i);
        String dateString = StringUtil.getDateString(1, "-");
        System.out.println(dateString);
        boolean phone = StringUtil.isPhone("17039670878");
        System.out.println(phone);
    }
}
